package adv3;

import java.util.Arrays;
import java.util.Random;

public class RandTest {

	public static void main(String[] args) {
		Random r = new Random();
		for (int i = 1; i <= 10; i++) {
			System.out.println("bool?:" + r.nextBoolean());
			System.out.println("double:" + r.nextDouble());
			System.out.println("long:" + r.nextLong());
			System.out.println("int:" + r.nextInt());
		}
		byte nb[] = new byte[20];
		r.nextBytes(nb);
		System.out.println(Arrays.toString(nb));
		System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
		for (int i = 1; i <= 200; i++) {
			int k = r.nextInt(100);// 0-100之间
			System.out.print(k + " ");
			if (i % 30 == 0)
				System.out.println();
		}
	}

}
